import request from './request'
//订单列表
export function orderList(params) {
  const data = params
  return request({
    url: '/app/h5/order/list',
    method: 'post',
    data
  })
}
//卖家发货
export function orderDeliver(params) {
  const data = params
  return request({
    url: '/app/h5/order/deliver',
    method: 'post',
    data
  })
}
//物流查询
export function logisticsTrackInfo(params) {
  return request({
    url: '/app/h5/order/logistics/trackInfo/'+params,
    method: 'get',
    params:{}
  })
}
//买家确认收货
export function orderReceiver(params) {
  const data = params
  return request({
    url: '/app/h5/order/receiver',
    method: 'post',
    data
  })
}
//物流公司查询
export function logisticsCodeList(params) {
  return request({
    url: '/app/h5/order/logistics/codeList',
    method: 'get',
    params:{}
  })
}
//订单详情
export function orderDetail(params) {
  return request({
    url: '/app/h5/order/detail/'+params,
    method: 'get',
    params:{}
  })
}
//提交订单
export function orderSubmit(params) {
  const data = params
  return request({
    url: '/app/h5/order/submit',
    method: 'post',
    data
  })
}
//退款发起（买家）
export function applyRefundBuy(params) {
  return request({
    url: '/app/h5/order/applyRefund/'+params.orderId,
    method: 'get',
    params:{}
  })
}
//退款处理（卖家）
export function applyRefundSell(params) {
  return request({
    url: '/app/h5/order/proceRefund/'+params.orderId+'/'+params.type,
    method: 'get',
    params:{}
  })
}
//订单列表
export function publishList(params) {
    const data = params
    return request({
      url: '/app/h5/appGoods/publishList',
      method: 'post',
      data
    })
  }
//取消订单
export function orderCancel(params) {
    return request({
      url: '/app/h5/order/cancel/'+params.type+'/'+params.orderId+'/'+params.remark,
      method: 'get',
      params:{}
    })
}
